import { lazy } from 'react'
import { ImportantEditModal } from '@/desktop/components'
import { Suspense } from '@/desktop/components/Loading'

const Content = lazy(async () => import('./Content'))

export { ReactComponent as Icon } from './icon.svg'

export function BatchGroupNotice({ open, onClose }: { open: boolean; onClose: () => void }) {
  return <ImportantEditModal title="批量群公告" open={open} onCancel={onClose} width="800px">
    {open ? (
      <Suspense>
        <Content onClose={onClose} />
      </Suspense>
    ) : null}
  </ImportantEditModal>
}
